package com.yaodian100.ec.giftcard.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.yaodian100.core.common.entity.BaseEntity;

@Entity
@Table(name = "EC_GIFTCARD_ITEM")
public class GiftcardItem extends BaseEntity {

	/** serial version */
	private static final long serialVersionUID = 4476007713944560245L;
	
	/** 禮品卡明細編號 */
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "seq_ec_giftcard_item")
	@SequenceGenerator(name = "seq_ec_giftcard_item", sequenceName = "SEQ_EC_GIFTCARD_ITEM")
	@Column(name = "ITEM_ID")
	private Long itemId;
	
	/** 禮品卡面額編號 */
	@Column(name = "AMOUNT_ID")
	private Long amountId;
	
	/** 卡號 */
	@Column(name = "CARD_CODE", length = 10)
	private String cardCode;
	
	/** 卡號檢核碼 */
	@Column(name = "CARD_CHECK_CODE", length = 1)
	private String cardCheckCode;
	
	/** 卡片密碼 */
	@Column(name = "CARD_PASSWORD", length = 8)
	private String cardPassword;
	
	/**
	 * 狀態
	 * 申请中 00
	 * 已入库 50
	 * 已领用 60
	 * 已核可 70
	 * 已作废 90
	 */
	@Column(name = "STATUS", length = 6)
	private String status;
	
	/** 入庫日期 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "WAREHOUSE_DATE")
	private Date warehouseDate;
	
	/** 充值期限 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "RECHARGE_DEADLINE")
	private Date rechargeDeadline;
	
	/** 領用單主檔編號 */
	@Column(name = "RECEIVE_ID")
	private Long receiveId;
	
	/** 領用日期 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "RECEIVE_DATE")
	private Date receiveDate;
	
	/**
	 * 充值狀態
	 * 未充值 0
	 * 已充值 1
	 */
	@Column(name = "RECHARGE_STATUS", length = 6)
	private String rechargeStatus;
	
	/** 充值日期 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "RECHARGE_DATE")
	private Date rechargeDate;
	
	/** 充值IP */
	@Column(name = "RECHARGE_IP", length = 20)
	private String rechargeIp;
	
	/** 會員編號 */
	@Column(name = "MEMBER_ID", length = 10)
	private String memberId;

	// getter & setter
	public Long getItemId() {
		return itemId;
	}

	public void setItemId(Long itemId) {
		this.itemId = itemId;
	}

	public Long getAmountId() {
		return amountId;
	}

	public void setAmountId(Long amountId) {
		this.amountId = amountId;
	}

	public String getCardCode() {
		return cardCode;
	}

	public void setCardCode(String cardCode) {
		this.cardCode = cardCode;
	}

	public String getCardCheckCode() {
		return cardCheckCode;
	}

	public void setCardCheckCode(String cardCheckCode) {
		this.cardCheckCode = cardCheckCode;
	}

	public String getCardPassword() {
		return cardPassword;
	}

	public void setCardPassword(String cardPassword) {
		this.cardPassword = cardPassword;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Date getWarehouseDate() {
		return warehouseDate;
	}

	public void setWarehouseDate(Date warehouseDate) {
		this.warehouseDate = warehouseDate;
	}

	public Date getRechargeDeadline() {
		return rechargeDeadline;
	}

	public void setRechargeDeadline(Date rechargeDeadline) {
		this.rechargeDeadline = rechargeDeadline;
	}

	public Long getReceiveId() {
		return receiveId;
	}

	public void setReceiveId(Long receiveId) {
		this.receiveId = receiveId;
	}

	public Date getReceiveDate() {
		return receiveDate;
	}

	public void setReceiveDate(Date receiveDate) {
		this.receiveDate = receiveDate;
	}

	public String getRechargeStatus() {
		return rechargeStatus;
	}

	public void setRechargeStatus(String rechargeStatus) {
		this.rechargeStatus = rechargeStatus;
	}

	public Date getRechargeDate() {
		return rechargeDate;
	}

	public void setRechargeDate(Date rechargeDate) {
		this.rechargeDate = rechargeDate;
	}

	public String getRechargeIp() {
		return rechargeIp;
	}

	public void setRechargeIp(String rechargeIp) {
		this.rechargeIp = rechargeIp;
	}

	public String getMemberId() {
		return memberId;
	}

	public void setMemberId(String memberId) {
		this.memberId = memberId;
	}
}